package com.weijin.model.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.weijin.model.enums.AttendanceStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

/**
 * 工作记录实体类
 *
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/28 15:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("工作记录")
public class WorkRecord {
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("用户id")
    private String userId;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("工作日期")
    private LocalDate date;
    @ApiModelProperty("工作时长")
    private LocalTime workTime;
    @ApiModelProperty("签到状态")
    private AttendanceStatus signInStatus;
    @ApiModelProperty("签退状态")
    private AttendanceStatus signOutStatus;

    public WorkRecord(String userId, String name, LocalDate date, LocalTime workTime, AttendanceStatus signInStatus, AttendanceStatus signOutStatus) {
        this.userId = userId;
        this.name = name;
        this.date = date;
        this.workTime = workTime;
        this.signInStatus = signInStatus;
        this.signOutStatus = signOutStatus;
    }
}
